<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue组件开发全局组件</title>
</head>

<body>
    <div id="app">
        {{msg}}
        <login></login>
        <user-list></user-list>
    </div>
</body>

</html>
<script type="module">
    import { } from './js/2.7.14_dist_vue.js';
    //创建一个全局组件
    Vue.component('login',{
        template: `<div id="login">
                        <h2>用户登录</h2>
                        <button>登录</button>
                        </div>
        `,
    });
    //用户列表组件
    Vue.component('userList',{
        template: `<div><h2>用户列表</h2></div>`
    })
    new Vue({
        el: '#app',
        data: {
            msg: 'hello vue'
        },
        methods: {

        },
        computed: {

        },
        components: {

        },
        created() {

        },
    })
</script>